import java.sql.Connection;

import com.dhtmlx.connector.*;

public class grid_12_attach_header_server extends ConnectorServlet {

	@Override
	protected void configure() {
		Connection conn= ( new DataBaseConnection()).getConnection();

		GridConnector c = new GridConnector(conn);
		c.dynamic_loading(100);

		GridConfiguration config = new GridConfiguration();
		config.addColumn(new GridColumn("ID", "ro", "id", 60, "left", "middle", "str", "", false));
		config.addColumn(new GridColumn("User name", "ed", "firstname", 160, "left", "middle", "str", "", false));
		config.addColumn(new GridColumn("#cspan", "ed", "lastname", 160, "left", "middle", "str", "", false));
		
		String[] cols = {"#rspan", "First name", "Last name"};
		config.addHeader(cols);

		c.setConfiguration(config);
		c.render_table("grid50000", "item_id", "item_nm,item_cd");

	}

}
